<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>海角论坛</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="fly,layui,前端社区">
    <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
    <link rel="stylesheet" href="../../static/res/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/res/css/global.css">
</head>
<body>
<meta name="referrer" content="no-referrer">
<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="/">
            <img src="../../static/res/images/logo.png" alt="layui">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs">
            <li class="layui-nav-item layui-this">
                <a href="/"><i class="iconfont icon-jiaoliu"></i>交流</a>
            </li>
            <li class="layui-nav-item">
                <a href="../../static/case/case.html"><i class="iconfont icon-iconmingxinganli"></i>案例</a>
            </li>
            <li class="layui-nav-item">
                <a href="http://www.layui.com/" target="_blank"><i class="iconfont icon-ui"></i>框架</a>
            </li>
        </ul>

        <ul class="layui-nav fly-nav-user" id="ul_user">

            <!-- 未登入的状态 -->
            <li class="layui-nav-item">
                <a class="iconfont icon-touxiang layui-hide-xs" href="/login"></a>
            </li>
            <li class="layui-nav-item">
                <a href="/login">登录</a>
            </li>
            <li class="layui-nav-item">
                <a href="/reg">注册</a>
            </li>
            <!--            <li class="layui-nav-item layui-hide-xs">-->
            <!--                <a href="/app/qq/" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" title="QQ登入"-->
            <!--                   class="iconfont icon-qq"></a>-->
            <!--            </li>-->
            <!--            <li class="layui-nav-item layui-hide-xs">-->
            <!--                <a href="/app/weibo/" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" title="微博登入"-->
            <!--                   class="iconfont icon-weibo"></a>-->
            <!--            </li>-->

            <!-- 登入后的状态 -->
            <!--
            <li class="layui-nav-item">
              <a class="fly-nav-avatar" href="javascript:;">
                <cite class="layui-hide-xs">贤心</cite>
                <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：layui 作者"></i>
                <i class="layui-badge fly-badge-vip layui-hide-xs">VIP3</i>
                <img src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg">
              </a>
              <dl class="layui-nav-child">
                <dd><a href="../user/set.html"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
                <dd><a href="../user/message.html"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
                <dd><a href="../user/home.html"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
                <hr style="margin: 5px 0;">
                <dd><a href="" style="text-align: center;">退出</a></dd>
              </dl>
            </li>
            -->
        </ul>
    </div>
</div>

<div class="fly-panel fly-column">
    <div class="layui-container">
        <ul class="layui-clear">
            <li class="layui-this"><a href="/">首页</a></li>
            <li><a href="">提问</a></li>
            <li><a href="">分享</a></li>
            <li><a href="">公告</a></li>
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

            <!-- 用户登入后显示 -->
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="../user/index.html">我发表的贴</a>
            </li>
            <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a href="../user/index.html#collection">我收藏的贴</a>
            </li>
        </ul>

        <div class="fly-column-right layui-hide-xs">
            <span class="fly-search"><i class="layui-icon"></i></span>
            <a href="add.html" class="layui-btn">发表新帖</a>
        </div>
        <div class="layui-hide-sm layui-show-xs-block"
             style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
            <a href="add.html" class="layui-btn">发表新帖</a>
        </div>
    </div>
</div>

<div class="layui-container">
    <div class="layui-row layui-col-space15">

        <div class="layui-col-md8 content detail">
            <div class="fly-panel detail-box">
                <h1>layuiadmin pro版  图片验证码验证后台怎么验证？</h1>
                <div class="fly-detail-info">
                    <span class="layui-badge layui-bg-green fly-detail-column">提问</span>
                    <span class="layui-badge" style="background-color: #999;">未结</span><span class="fly-list-nums">
                   <a href="#comment"><i class="iconfont" title="回答"></i> 1</a><i class="iconfont" title="人气"></i> 9</span></div>

                <div class="detail-about">
                    <a class="fly-avatar" href="/u/7619472/"><img src="//q.qlogo.cn/qqapp/101235792/9F83630C25C92749CE97F61765173A24/100" alt="韩俊营"></a>
                    <div class="fly-detail-user"><a href="/u/7619472/" class="fly-link">
                         <cite>韩俊营</cite><i class="layui-badge fly-badge-vip">VIP4</i></a><span>9分钟前</span>
                    </div>

                    <div class="detail-hits"><span style="padding-right: 10px; color: #FF7200">悬赏：20飞吻</span>
                    </div>
                </div>
                <div class="layui-btn-container fly-detail-admin" id="LAY_jieAdmin" data-id="57678">
                <button class="layui-btn layui-btn-sm jie-admin jie-admin-collect" type="collect" data-type="add" style="visibility: visible;">收藏 </button>
                </div>
<!--?                这是帖子的内容-->
<div class="detail-body layui-text photos">                    <div class="layui-elem-quote">  &#20808;&#38468;&#19978;&#22320;&#22336;&#65306; <a href="http://lowcode.magicalcoder.com/layui?from=layui" target="_blank" rel="nofollow">http://lowcode.magicalcoder.com/layui?from=layui</a> </div> <br>&#24744;&#26159;&#21542;&#26377;&#36807;&#20197;&#19979;&#24819;&#27861;&#65306;<br><hr>&#9679; &#25105;&#26159;&#19968;&#21517; Layui &#21021;&#23398;&#32773;&#65292;&#25105;&#24819;&#20197;&#26368;&#30701;&#30340;&#26102;&#38388;&#24555;&#36895;&#36827;&#20837; Layui &#30340;&#22823;&#38376;<br>&#9679; &#25105;&#26159;&#19968;&#21517;&#21518;&#31471;&#24037;&#31243;&#24072;&#65292;&#34429;&#33021;&#29087;&#32451;&#25484;&#25569; JS &#30340;&#20889;&#27861;&#65292;&#20294;&#26159;&#39029;&#38754;&#26679;&#24335;&#24067;&#23616;&#35753;&#25105;&#24456;&#22836;&#30140;<br>&#9679; &#25105;&#26159;&#19968;&#21517;&#21019;&#19994;&#32773;&#25110;&#32773;&#22242;&#38431; Leader&#65292;&#22914;&#26524;&#33021;&#26377;&#19968;&#27454;&#36719;&#20214;&#38477;&#20302;&#22242;&#38431;&#25110;&#32773;&#25105;&#30340;&#24320;&#21457;&#38376;&#27099;&#65292;&#25552;&#21319;&#25928;&#29575;&#21644;&#20307;&#39564;&#65292;&#23601;&#22909;&#20102;<br>&#9679; &#25105;&#27491;&#22312;&#23547;&#25214;&#19968;&#27454;&#33021;&#23884;&#20837;&#24037;&#20316;&#27969;&#65292;Sass,Pass &#31561;&#31995;&#32479;&#30340;&#21487;&#35270;&#21270; WEB &#34920;&#21333;&#35774;&#35745;&#22120;&#65292;&#35753;&#29992;&#25143;&#33258;&#24049;&#36890;&#36807;&#25105;&#20204;&#25552;&#21069;&#33258;&#23450;&#20041;&#22909;&#30340;&#32452;&#20214;&#65292;&#25302;&#25341;&#24067;&#23616;&#37197;&#32622;&#65292;&#23436;&#25104;&#36719;&#20214;&#26576;&#20010;&#29615;&#33410;&#30340;&#33258;&#21160;&#21270;<br>&#9679; &#25105;&#24819;&#25226;&#31995;&#32479;&#20013;&#30340;&#23500;&#25991;&#26412;&#32534;&#36753;&#22120;&#26367;&#25442;&#25104;&#19968;&#27454;&#26356;&#28789;&#27963;&#65292;&#26356;&#39640;&#23450;&#21046;&#21270;&#30340;&#32534;&#36753;&#22120;&#65292;&#35753;&#29992;&#25143;&#25110;&#32773;&#25105;&#20204;&#30340;&#36816;&#33829;&#65292;&#32534;&#36753;&#33021;&#22815;&#33258;&#34892;&#25302;&#25341;&#35774;&#35745;&#30028;&#38754;&#24067;&#23616;&#65292;&#22270;&#29255;&#65292;&#25991;&#23383;&#65292;&#34920;&#26684;&#31561;&#31561;&#65292;&#36825;&#26679;&#23601;&#20943;&#23569;&#20102;&#31243;&#24207;&#21592;&#30340;&#25237;&#20837;<br>&#9679;  ...<br><br>&#22914;&#26524;&#24744;&#26377;&#20197;&#19978;&#20219;&#19968;&#24819;&#27861;&#65292;&#37027;&#23601;&#19968;&#36215;&#26469;&#22260;&#35266;&#19979;&#21543;<br>    <hr>&#19979;&#38754;&#32473;&#22823;&#23478;&#20171;&#32461;&#19979;&#36825;&#27454;&#36719;&#20214;&#30446;&#21069;&#24050;&#32463;&#31283;&#23450;&#29256; &#21151;&#33021;&#21015;&#34920;&#22914;&#19979;&#65306;<br>    <img alt="[&#24515;]" title="[&#24515;]" src="//img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/hearta_thumb.gif">  &#24038;&#20391;&#33258;&#23450;&#20041;&#30340;&#21508;&#31181;Layui&#32452;&#20214;&#65292;&#21487;&#20197;&#25302;&#25341;&#21040;&#24037;&#20316;&#21306;<br>     <img alt="[&#24515;]" title="[&#24515;]" src="//img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/hearta_thumb.gif">  &#20013;&#38388;&#24037;&#20316;&#21306; &#65288;&#35270;&#22270;|&#39044;&#35272;|HTML|&#33050;&#26412; &#21508;&#31181;&#24037;&#20316;&#27169;&#24335;&#36866;&#24212;&#19981;&#21516;&#20351;&#29992;&#20154;&#21592;&#65289;JS&#33050;&#26412;&#25903;&#25345;&#35843;&#35797;&#25490;&#26597;<br>     <img alt="[&#24515;]" title="[&#24515;]" src="//img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/hearta_thumb.gif">  &#21491;&#20391;&#23646;&#24615;&#37197;&#32622;<br>     <img alt="[&#24515;]" title="[&#24515;]" src="//img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/hearta_thumb.gif">  &#24038;&#19979;&#20391; &#22522;&#20110;&#32467;&#26500;&#30340;&#32452;&#20214;&#25551;&#36848;&#23548;&#33322;&#26641;&#65288;&#20063;&#21487;&#20197;&#25302;&#25341;&#25490;&#24207; &#25554;&#20837; &#21024;&#38500;&#31561;&#31561;&#65289;<br>     <img alt="[&#24515;]" title="[&#24515;]" src="//img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/hearta_thumb.gif">  &#25193;&#23637;&#24037;&#20855;&#65306;&#26679;&#24335;&#24037;&#20855;&#31665;&#65288;&#28385;&#36275;layui&#20197;&#22806;&#30340;&#33258;&#23450;&#21046;&#30028;&#38754;&#65289;  <br>    <img alt="[&#24515;]" title="[&#24515;]" src="//img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/hearta_thumb.gif">   &#22914;&#20309;&#33258;&#23450;&#20041;&#32452;&#20214;&#21644;&#23646;&#24615;&#65292;&#35843;&#29992;&#24067;&#23616;&#22120;&#30340;API<br><br> &#36719;&#20214;&#39044;&#35272;&#65306;<br><hr>    <img src="//cdn.layui.com/upload/2019_9/21346416_1568169325606_17568.png"> <br><br>&#24038;&#20391;&#32452;&#20214;&#65306;&#25918;&#32622;&#20102;layui&#23448;&#26041;&#25552;&#20379;&#30340;&#24120;&#29992;&#32452;&#20214;&#21644;&#23481;&#22120;&#65292;&#36731;&#26494;&#25302;&#25341;&#21040;&#20013;&#38388;&#21363;&#21487;&#23436;&#25104;&#24067;&#23616;&#65292;&#36824;&#21487;&#20197;&#26080;&#38480;&#28155;&#21152;&#26032;&#30340;&#32452;&#20214;&#65292;&#25152;&#35265;&#25152;&#24471;<br><img src="//cdn.layui.com/upload/2019_9/21346416_1568180252477_63357.png"> <img src="//cdn.layui.com/upload/2019_9/21346416_1568180261323_9507.png"> <br><br>&#20013;&#38388;&#24037;&#20316;&#21306;&#65306;&#25552;&#20379;&#22810;&#31181;&#24037;&#20316;&#27169;&#24335; &#28385;&#36275;&#19981;&#21516;&#36523;&#20221;&#20351;&#29992;&#32773;<br>&#35270;&#22270;&#65306;&#20250;&#25226;&#26174;&#31034;&#36741;&#21161;&#36793;&#26694;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568181027011_9652.png"> <br><br>&#39044;&#35272;&#65306;99.99%&#25509;&#36817;&#26368;&#32456;&#25928;&#26524;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568181060769_48267.png"> <br><br>HTML:&#32534;&#20889;layui&#30340;html&#65292;&#35797;&#35797;&#23548;&#20837;&#24744;&#24050;&#32463;&#20889;&#36807;&#30340;layu html &#27880;&#24847;&#26159;&lt;body&gt;&lt;/body&gt;&#21306;&#22495;&#20869;&#30340;html<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568181197647_46255.png"> <br><br>&#33050;&#26412;&#65306;&#22312;&#32447;&#32534;&#20889;javascript&#33050;&#26412;&#65292;&#35753;&#20320;&#30340;&#30028;&#38754;&#26356;&#21152;&#33258;&#30001;&#21270;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568181284414_22657.png"> <br><br>&#33050;&#26412;&#35843;&#35797;&#65306;&#20889;&#20102;&#33050;&#26412;&#19981;&#30693;&#36947;&#24590;&#20040;&#35843;&#35797;&#65311;&#24320;&#21551;&#35843;&#35797;&#25353;&#38062;&#65292;&#25171;&#24320;&#27983;&#35272;&#22120;&#25511;&#21046;&#21488;&#65292;&#28982;&#21518;&#20174;&#33050;&#26412;&#27169;&#24335;&#20999;&#25442;&#33267;&#35270;&#22270;&#27169;&#24335;&#65292;&#21363;&#21487;&#28608;&#27963;&#35843;&#35797;&#24037;&#20855;<br><img src="//cdn.layui.com/upload/2019_9/21346416_1568181347506_5174.png"> <br><br>&#21491;&#20391;&#23646;&#24615;&#38754;&#26495;&#65306;&#20197;&#19968;&#20010;&#21160;&#24577;&#34920;&#26684;&#20026;&#20363;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568181785852_268.png"> <br><br>&#31616;&#21333;&#37197;&#32622;&#19968;&#19979; &#21363;&#21487;&#39044;&#35272;&#65292;&#24819;&#24819;&#22823;&#23478;&#26085;&#24120;&#24320;&#21457;&#20013;&#21160;&#24577;&#34920;&#26684;&#30340;&#21151;&#33021;&#37117;&#31867;&#20284;&#65292;&#37027;&#20040;&#23601;&#21487;&#20197;&#23450;&#21046;&#19968;&#20010;&#33258;&#24049;&#30340;&#34920;&#26684;&#65292;&#20132;&#20114;&#37096;&#20998;JS&#25552;&#21069;&#20889;&#22909;&#65292; &#20197;&#21518;&#29992;&#21040;&#30452;&#25509;&#25302;&#25341;&#36827;&#26469;&#12290;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568181795157_9014.png"> <img src="//cdn.layui.com/upload/2019_9/21346416_1568181803528_67397.png"> <br><br>&#23646;&#24615;&#26159;&#26681;&#25454;layui&#23448;&#26041;&#25991;&#26723;&#36827;&#34892;&#37197;&#32622;&#65292;&#25903;&#25345;&#33258;&#23450;&#20041;&#21508;&#31181;&#23646;&#24615;<br><br>&#23548;&#33322;&#26641;&#65306;&#20026;&#25105;&#20204;&#23454;&#26102;&#23637;&#31034;&#39029;&#38754;&#19978;&#30340;&#32452;&#20214; &#24744;&#20063;&#21487;&#20197;&#36890;&#36807;&#25805;&#20316;&#23548;&#33322;&#26641;&#26469;&#25805;&#20316;&#30028;&#38754;&#24067;&#23616;&#65292;&#21487;&#20197;&#25302;&#25341;&#23548;&#33322;&#26641;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568184537039_9979.png"> <img src="//cdn.layui.com/upload/2019_9/21346416_1568184552206_62279.png"> <br><br>&#22810;&#31181;&#35774;&#22791;&#31471;&#23454;&#26102;&#39044;&#35272;&#25928;&#26524;&#65306;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568184638027_39374.png"> <br><br>&#26679;&#24335;&#24037;&#20855;&#31665;&#65306;&#39069;&#22806;&#20026;&#24744;&#25552;&#20379;&#26356;&#22810;&#26679;&#24335;&#25511;&#21046;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568184094396_11622.png"> <img src="//cdn.layui.com/upload/2019_9/21346416_1568184102039_238.png"> <br><hr>&#19979;&#38754;&#32473;&#22823;&#23478;&#35762;&#19968;&#19979;&#39640;&#38454;&#24212;&#29992;&#65306;<br>&#22914;&#20309;&#36319;&#24067;&#23616;&#22120;&#20132;&#20114;&#65306;&#23436;&#21892;&#30340;API&#35843;&#29992;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568185213724_85277.png"> <br><br>&#22914;&#20309;&#33258;&#23450;&#20041;&#32452;&#20214;&#21644;&#23646;&#24615;&#65306;<br> &#31532;&#19968;&#27493;&#65306;&#25171;&#24320;assets/drag/js/business/user/ui/layui/2.5.4/constant.js &#37197;&#32622;&#24038;&#20391;&#25302;&#25341;&#28304;&#32452;&#20214;<br>&#22312;this.components&#20013;&#22686;&#21152;<br><pre> {<br>    name:"&#36755;&#20837;&#26694;",<br>    icon:"assets/drag/img/left/import1.png",<br>    html:"&lt;input type='text' autocomplete='off' class='layui-input'/&gt;"<br> }</pre>&#24038;&#20391;&#23601;&#20250;&#20986;&#29616;&#19968;&#20010;&#21487;&#25302;&#25341;&#21306;<br>&#31532;&#20108;&#27493;&#65306;&#23450;&#20041;&#32452;&#20214;&#21508;&#31181;&#35268;&#21017;&#34892;&#20026;<br>tagClassMapping&#37197;&#32622;&#22312;&#23548;&#33322;&#26641;&#30340;&#21517;&#31216;&#24050;&#32463;&#27492;&#33410;&#28857;&#30340;&#21508;&#31181;&#38480;&#21046;&#21151;&#33021;<br><pre>"type=text":{name:"&#36755;&#20837;&#26694;",treeExtraName:{attr:['id','name'],text:false},dragInto:false,duplicate:true, copy:true,      paste:false,    canDelete:true},</pre>&#31532;&#19977;&#27493;&#65306;&#37197;&#32622;&#21491;&#20391;&#23646;&#24615;<br>                <pre>"type=text":[<br>                        {type:this.type.TEXTAREA,clearAttr:true,oneLine:true,change:this.change.ATTR,attrName:'value',title:'&#20540;'},<br>                        {type:this.type.TEXT,clearAttr:true,oneLine:true,change:this.change.ATTR,attrName:'placeholder',title:'&#25552;&#31034;&#25991;&#26412;'},<br>                        {type:this.type.CHECKBOX,clearAttr:true,oneLine:true,change:this.change.ATTR,title:'&#31105;&#29992;',options:[{"c":true,"n":"disabled","t":"&#31105;&#29992;","u":false}]},<br>                        {type:this.type.CHECKBOX,clearAttr:true,oneLine:true,change:this.change.ATTR,title:'&#21482;&#35835;',options:[{"c":true,"n":"readonly","t":"&#21482;&#35835;","u":false}]}<br>                    ],</pre> <br>&#20415;&#23436;&#25104;&#20102;&#19968;&#20010;&#25511;&#20214;&#30340;&#23450;&#20041;&#12290;<br><br><img src="//cdn.layui.com/upload/2019_9/21346416_1568185833603_46128.png"> <br><br>&#20855;&#20307;&#21487;&#20197;&#21442;&#32771;&#23448;&#26041;&#35814;&#32454;&#25991;&#26723; &#27599;&#19968;&#20010;&#23383;&#27573;&#37117;&#26377;&#35828;&#26126;<br><br><hr>MagicalDrag &#31283;&#23450;&#29256;&#22320;&#22336;&#65306; <a href="http://lowcode.magicalcoder.com/layui?from=layui" target="_blank" rel="nofollow">http://lowcode.magicalcoder.com/layui?from=layui</a> <br> <br>          </div>

            </div>
            <div class="fly-panel detail-box" id="flyReply">
                <fieldset class="layui-elem-field layui-field-title" style="text-align: center;">
                    <legend>回帖</legend>
                </fieldset>
                <ul class="jieda" id="jieda">
                    <li data-id="199926">
                        <a name="item-1568192604697"></a><div class="detail-about detail-about-reply">
                        <a class="fly-avatar" href="/u/37262904/"><img src="//thirdqq.qlogo.cn/g?b=oidb&amp;k=ibwJM145xXVzLHboMtw1DTw&amp;s=100" alt="Right_tzw"></a>
                        <div class="fly-detail-user">
                            <a href="/u/37262904/" class="fly-link">  <cite>Right_tzw</cite></a>
                        </div>
                        <div class="detail-hits"><span>7分钟前</span> </div>
                    </div>
                        <div class="detail-body layui-text jieda-body photos">  这是普通社区o
                        </div>
                        <div class="jieda-reply">
                            <a href="javascript:;" class="comment_up has_comment_up fr">1</a>
                            <a href="javascript:;" class="comment_reply fr">回复</a>
                        </div>
                    </li>
                </ul>
                <div style="text-align: center"></div>
                <a name="comment"> </a>
                <div class="layui-form layui-form-pane"><form action="/jie/reply/" method="post">
                    <div class="layui-form-item layui-form-text">

                    </div>
                    <div class="layui-form-item">
                        <input type="hidden" name="jid" value="57678">
                        <input type="hidden" name="daPages" value="1">
                        <button class="layui-btn" lay-filter="*" lay-submit="">提交回复</button>
                    </div>
                </form>
                </div>
            </div>
        </div>


        <div class="layui-col-md4">
            <dl class="fly-panel fly-list-one">
                <dt class="fly-panel-title">本周热议</dt>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>
                <dd>
                    <a href="">基于 layui 的极简社区页面模版</a>
                    <span><i class="iconfont icon-pinglun1"></i> 16</span>
                </dd>

                <!-- 无数据时 -->

                <div class="fly-none">没有相关数据</div>

            </dl>

            <div class="fly-panel">
                <div class="fly-panel-title">
                    这里可作为广告区域
                </div>
                <div class="fly-panel-main">
                    <a href="" target="_blank" class="fly-zanzhu" style="background-color: #393D49;">虚席以待</a>
                </div>
            </div>

            <div class="fly-panel fly-link">
                <h3 class="fly-panel-title">友情链接</h3>
                <dl class="fly-panel-main">
                    <dd><a href="http://www.layui.com/" target="_blank">layui</a>
                    <dd>
                    <dd><a href="http://layim.layui.com/" target="_blank">WebIM</a>
                    <dd>
                    <dd><a href="http://layer.layui.com/" target="_blank">layer</a>
                    <dd>
                    <dd><a href="http://www.layui.com/laydate/" target="_blank">layDate</a>
                    <dd>
                    <dd>
                        <a href="mailto:xianxin@layui-inc.com?subject=%E7%94%B3%E8%AF%B7Fly%E7%A4%BE%E5%8C%BA%E5%8F%8B%E9%93%BE"
                           class="fly-link">申请友链</a>
                    <dd>
                </dl>
            </div>

        </div>
    </div>
</div>

<div class="fly-footer">
    <p><a href="#">海角论坛</a> 2019 &copy; <a href="#">葫芦娃出品</a></p>

</div>

<script src="../../static/json/jquery-3.3.1.min.js"></script>
<script src="../../static/res/layui/layui.js"></script>
<script src="../../static/js/jwt.js"></script>
<script src="../../static/js/index.js"></script>

<script>
    layui.cache.page = 'jie';
    layui.cache.user = {
        username: '游客'
        , uid: -1
        , avatar: '../res/images/avatar/00.jpg'
        , experience: 83
        , sex: '男'
    };
    layui.config({
        version: "3.0.0"
        , base: '../res/mods/'
    }).extend({
        fly: 'index'
    }).use('fly');

    layui.use('layer');

    $(function () {

        hasUser();

        getPostList(0, 0, 0, null);

    });


    function getPostList(type, state, dateOrComm, pageConf) {

        if (!pageConf) {
            pageConf = {};
            pageConf.pageSize = 8;
            pageConf.currentPage = 1;
        }

        $.ajax({
            type: "get",
            url: HOST_URL + "posts/getShowPostList",
            data: pageConf,
            dataType: "json",
            success: function (data) {
                console.log(data);
                layui.use('laypage', function () {
                    var laypage = layui.laypage;

                    laypage.render({
                        elem:'laypage',
                        count:data.length,
                        curr:pageConf.currentPage,
                        limit:pageConf.pageSize,
                        first:"首页",
                        last:"尾页",
                        layout:['count','prev','page','next','skip'],
                        jump: function (obj, first) {
                            if (!first) {
                                pageConf.currentPage = obj.curr;
                                pageConf.pageSize = obj.limit;
                                getPostList(pageConf);
                            }
                        }
                    });

                    drawList(data);
                })
            }
        })
    }

    function drawList(data) {
        let appendVal = ``;
        $.each(data, function (i, posts) {

            appendVal += `
                <li>
                    <a href="../user/home.html?username=${posts.username}" class="fly-avatar">
                        <img src="${posts.user.picture}"
                             alt="${posts.user.username}">
                    </a>
                    <h2>
                        <a class="layui-badge">${posts.type}</a>
                        <a href="detail.html?pid=${posts.pid}">${posts.title}</a>
                    </h2>
                    <div class="fly-list-info">
                        <a href="../user/home.html?username=${posts.username}" link>
                            <cite>${posts.user.username}</cite>
                            <!--
                            <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                            -->
                            <i class="layui-badge fly-badge-vip">VIP${posts.user.level}</i>
                        </a>
                        <span>${posts.pubDate}</span>

                        <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> ${posts.reward}</span>
            `;

            if (posts.jie == 1) {
                appendVal += `
                    <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
                `;
            }

            if (posts.commCount) {
                appendVal += `
                        <span class="fly-list-nums">
                            <i class="iconfont icon-pinglun1" title="回答">${posts.commCount}</i>
                        </span>
                    </div>
                    <div class="fly-list-badge">
                `;
            } else {
                appendVal += `
                        <span class="fly-list-nums">
                            <i class="iconfont icon-pinglun1" title="回答">  0</i>
                        </span>
                    </div>
                    <div class="fly-list-badge">
                `;
            }


            if (posts.top == 1) {

                appendVal += `
                    <span class="layui-badge layui-bg-black">置顶</span>
                `;
            }

            if (posts.jing == 1) {

                appendVal += `
                    <span class="layui-badge layui-bg-red">精帖</span>
                `;
            }

            appendVal += `
                    </div>
                </li>
            `;
        });

        $("#ul_posts").html(appendVal);
    }

    function hasUser() {

        let jwt = getJwtToken();
        if (jwt) {
            $.ajax({
                type: "get",
                url: HOST_URL + "user/getUser",
                dataType: "json",
                headers: createAuthorizationTokenHeader(),
                success: function (data) {
                    console.log(data);
                    if (data) {
                        let appendVal = `
                            <li class="layui-nav-item">
                              <a class="fly-nav-avatar" href="javascript:;">
                                <cite class="layui-hide-xs">${data.username}</cite>
<!--                                <i class="iconfont icon-renzheng layui-hide-xs" title="认证信息：layui 作者"></i>-->
                                <i class="layui-badge fly-badge-vip layui-hide-xs">VIP${data.level}</i>
                                <img src="${data.picture}">
                              </a>
                              <dl class="layui-nav-child">
                                <dd><a href="../user/set.html"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
                                <dd><a href="../user/message.html"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
                                <dd><a href="../user/home.html"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
                                <hr style="margin: 5px 0;">
                                <dd><a href="javascript:logout();" style="text-align: center;">退出</a></dd>
                              </dl>
                            </li>
                        `;

                        $("#ul_user").html(appendVal);
                    }
                }
            })
        }
    }

    /**
     * 注销
     */
    function logout() {
        layer.confirm("真的要注销吗?", () => {

            removeJwtToken();
            layer.msg("注销成功", {time: 1000}, function () {
                location.reload();
            });
        })
    }

</script>

</body>
</html>